http: Allow http filters to add a body that's not readily available to a headers-only request/response#12832
Conversation
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
… body Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
|
@mattklein123 This is a draft PR for the feature we discussed in #12814. Please take a look and let me know what you think. I added a unit test, and I'll add integration tests once we agree on the implementation. |
mattklein123
left a comment
There was a problem hiding this comment.
At a high level this looks great, thanks. Can you also add an integration test per discussion?
/wait
…t it Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
|
I updated the doc of the new FilterHeadersStatus to explain that using |
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
…ream Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
mattklein123
left a comment
There was a problem hiding this comment.
Thanks great work. Just some small comments. @snowp @alyssawilk in case you want to take a quick look.
/wait
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
…r a filter that returns ContinueAndEndStream Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
|
I moved the test to protocol_integration_tests and removed the default switch statement. I also fixed the bug, done some minimum refactoring in |
|
/retest |
|
Retrying Azure Pipelines, to retry CircleCI checks, use |
mattklein123
left a comment
There was a problem hiding this comment.
Thanks looks great. @snowp can you PTAL since you have been doing a bunch of work in this area recently? Thank you.
snowp
left a comment
There was a problem hiding this comment.
Thanks this seems like a great addition, just a few comments
test/integration/filters/continue_headers_only_inject_body_filter.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
snowp
left a comment
There was a problem hiding this comment.
Just a few more comments, thanks for iterating!
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
|
Awesome. Can you merge main? It was broken temporarily. /wait |
Done! |
Commit Message:
Allow HTTP filters to add a body that's not readily available to a headers-only request/response.
Signed-off-by: Yosry Ahmed yosryahmed@google.com
Additional Description:
This is done through adding a new FilterHeadersStatus::ContinueAndDontEndStream. This allows a filter to continue headers iteration without ending the stream. The filter can then add the request/response body by using injectEncodedDataToFilterChain/injectDecodedDataToFilterChain.
Risk Level: ?
Testing: Unit and integration tests.
Docs Changes: N/A
Release Notes: N/A
Fixes #12814